1 <?php
2 include(
"header.php");
3 include(
"sidebar.php");
4 include(
"dbconnection.php");
5 if
(isset($_GET[empid]))
6 {
7 $results = mysql_query(
"DELETE from employee where employeeid ='$_GET[empid]'");
8 }
9 $results= mysql_query(
"select * from employee where employeetype='Employees'");
10 //echo
"emp".mysql_num_rows($result);
11
12 ?>
13         
14                             
15         <div id=
"main">
16             
17             <a name=
"TemplateInfo"></a>
18             <h1>View Employees</h1>
19             <?php
20             
if($_SESSION[empid] == 1)
21             {
22             ?>
23             <h3><center><a href=
"employees.php">Add Employees</a></center></h3>
24              <?php
25              }
26             ?>
27            
28             <?php

29 if
($ctins == 1)
30 {
31     echo
"<center><b>Employees account created successfully...</b></center><br>";
32     echo
"<center><b><a href='emplogin.php'>Click here to Login.</a></b></center>";
33 }

34 else

35 {
36     ?>
37         <form id=
"form1" name="form1" method="post" action="">
38           <table width=
"531" border="1" align="left">
39             <tr>
40               <th width=
"130" scope="col">Employee Name</th>
41               <th width=
"123" scope="col">Login ID</th>
42               <th width=
"138" scope="col">Contact Nos</th>
43               <th colspan=
"3" width="112" scope="col">Action</th>
44             </tr>
45           <?php
46           
while($arrrec = mysql_fetch_array($results))
47           {
48            echo
" <tr>
49               <td>&nbsp; $arrrec[fname]&nbsp; $arrrec[lname]</td>
50               <td>&nbsp; $arrrec[loginid]</td>
51               <td>Ph. No.
1 : $arrrec[contactno1] <br> Ph. No.2 : $arrrec[contactno2]</td>
52               <td><a href='employeeviewmore.php?empid=$arrrec[employeeid]'>More</a></td><td align='center'><a href='employees.php?empid=$arrrec[employeeid]'>Edit</a></td><td align='center'><a href='viewemployees.php?empid=$arrrec[employeeid]'>Delete</a></td>
53             </tr>"
;
54           }
55           ?>
56           </table>
57         </form>
58     <?php
59     }
60     ?>
61             <p>&nbsp;</p>
62 <br />
63                                             
64         </div>
65         
66 <!-- wrap ends here -->
67 </div>
68         
69 <?php
70 include(
"footer.php");
71 ?>


Gõ tìm kiếm nhanh...